package com.liyang.springcloud.service.impl;

import com.liyang.springcloud.dao.StorageDao;
import com.liyang.springcloud.service.StorageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @BelongsProject: cloud-2024
 * @BelongsPackage: com.liyang.springcloud.service.impl
 * @Author: liyang
 * @CreateTime: 2024-01-10  11:03
 * @Description: 库存实现类
 * @Version: 1.0
 */
@Service
@Slf4j
public class StorageServiceImpl implements StorageService {

    @Resource
    private StorageDao storageDao;

    @Override
    public void decrease(Long productId, Integer count) {
        log.info("------->storage-service中扣减库存开始");
        storageDao.decrease(productId, count);
        log.info("------->storage-service中扣减库存结束");
    }
}
